package com.example.blog.dao;

import com.example.blog.dto.CommentDTO;
import com.fasterxml.jackson.databind.deser.std.NumberDeserializers;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
@Repository
public interface CommentDao {

    List<CommentDTO> findCommentByarticleid(Integer articleid);

    List<CommentDTO> findCommentByuserid(Integer userid);

    Integer addComment(Integer userid, Integer articleid, String content, LocalDateTime createtime);

    Integer deleteById(Integer id,Integer userid);

    List<CommentDTO> findByUidandAid(Integer userid,Integer articleid);
    Integer deleteComment(Integer id);



}
